//
//  UPButtonCollectionViewCell.m
//  Uang Pasti
//
//  Created by 李永彬 on 2025/8/25.
//

#import "UPButtonCollectionViewCell.h"

@implementation UPButtonCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self up_setupUI];
    }
    return self;
}

- (void)up_setupUI {
    // 背景图片
    self.backgroundImageView = [[UIImageView alloc] init];
    self.backgroundImageView.contentMode = UIViewContentModeScaleToFill;
    [self.contentView addSubview:self.backgroundImageView];

    [self.backgroundImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView);
    }];
}

- (void)up_configureWithImageName:(NSString *)imageName {
    self.backgroundImageView.image = [UIImage imageNamed:imageName];
}

@end

